﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Agility.Web.Resources;

namespace Agility.Web.Models.DomainModel
{
    [MetadataType(typeof(AssessmentMetadata))]
    public partial class Assessment
    {
        public class AssessmentMetadata
        {
            [Key]
            [Editable(false, AllowInitialValue = true)]
            [Display(AutoGenerateField = false)]
            public Guid Id { get; private set; }

            [Display(AutoGenerateField = true, Order = 0, ResourceType = typeof(AssessmentResources), Name = "AssessmentEffortSize")]
            public int EffortSize { get; set; }

            [Display(AutoGenerateField = true, Order = 1, ResourceType = typeof(AssessmentResources), Name = "AssessmentPotentialBusinessValue")]
            public int PotentialBusinessValue { get; set; }

            [Range(0, 1, ErrorMessageResourceName = "ValidationErrorStrategyAlignmentValue", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            [Display(AutoGenerateField = true, Order = 2, ResourceType = typeof(AssessmentResources), Name = "AssessmentStrategyAlignment")]
            public decimal StrategyAlignment { get; set; }

            [Display(AutoGenerateField = true, Order = 3, ResourceType = typeof(AssessmentResources), Name = "AssessmentRankingValue")]
            public decimal RankingValue { get; private set; }

            [Editable(false)]
            [Display(AutoGenerateField = true, Order = 4, ResourceType = typeof(AssessmentResources), Name = "AssessmentIsApproved")]
            public bool IsApproved { get; private set; }

            [Editable(false)]
            [Display(AutoGenerateField = true, Order = 5, ResourceType = typeof(AssessmentResources), Name = "AssessmentCreationDate")]
            public DateTime CreationDate { get; private set; }
        }
    }
}